package aop03;

import aop02.SomeException;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/5/17 15:53
 * Version:1.0-SNAPSHOT
 * Description:
 */
public class SomeServiceImpl implements SomeService {
    @Override
    public void doSome() {
//        try {
//            Thread.sleep(3000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        System.out.println("SomeServiceImpl.doSome");
    }

    @Override
    public void doOther() throws SomeException {
        System.out.println("SomeServiceImpl.doOther");
        throw new SomeException("执行doOther方法遇到了异常");
    }

    @Override
    public int add(int i, int j) {
        System.out.println("SomeServiceImpl.add");
        return i+j;
    }
}
